import numpy as np

np.random.seed(7)
b = np.random.randint(40, 100, size=10)

c = b < 60
print(b[c])

print(b[(b >= 60) & (b <= 80)])         #&与
print(b[(b < 60) | (b > 90)])           #|或
print(b[~(b < 60)])                     #~非
